README.htmlTEXTMACA$ô™Ø©—™Ø©—ÅÅÅã
README.htmlXTND
HTML Translator
Version
1.0
Written by:
Brian A. Sullivan and Jonathan
Ryan Day
Copyright 1994 © The University of Michigan
All rights
reserved.
This translator is for use in editing HTML documents in Macintosh
applications that support the XTND System. It allows translators, written
independently of the application, to import and export file information to and
from the application. We used
ClarisWorks 2.0 for testing and making various formatting decisions, which may
appear different in another application.
Note: Version
1.0 is export-only. Subsequent versions of the translator will opening HTML files
as well as saving them. For now, it is recommended that you keep copies of
the documents in the application's native format. This will allow you to easily
edit them later.
Table of contents:
- System
requirements
- How
to install the XTND HTML Translator
- How to save a document as an HTML
file
- Export style guidelines and conversions
- How to make HyperText
links
- About in line images
- Using the ClarisWorks stationery
System
requirements
The XTND HTML Translator
requires the XTND System, which should be included with an XTND capable
application. Machine requirements include System 7.0 or higher, and if you are
using ClarisWorks, you must
have version 2.0 or later.
How to
install the XTND HTML Translator
If you have an application that supports
the XTND System, then you probably will have a folder named "Claris" in your system folder. In it should reside a file called "Claris
XTND System" and also a folder called "Claris Translators". Put
the XTND HTML Translator in the "Claris Translators" folder. When you
try to save a file in an XTND-capable
application, the XTND System looks to see what translators are located
in this folder. It will now appear in your "Save As" listing of file
formats.
How to save a document as an HTML file
To
save a document as an HTML file, simply go to the "Save As" dialog
box as you normally would to specify the name and format of the saved file.
In the menu marked Save As, click and scroll to select "HTML".
Select the correct
directory, name the file and click on Save. That's it. It
is helpful to keep track of the file format of you documents by adding extensions
to the filenames, such as "myfile.html" for an HTML
file, or "myfile.cw" for a ClarisWorks file, but this is
not necessary.
Export style guidelines and conversions
To
simulate the HTML text styles in the word processor, we used the values
that are defaulted to in NCSA
Mosaic 1.0.3 for the Macintosh. There are limitations of what can do in HTML,
so we tried hard to imitate what we could. Here's a listing of certain text
attributes in ClarisWorks, and how they map to HTML:
- Bold, italics,
and underline = <strong>, <cite>, and
<em>
- Headers: If a piece of text is bold, it is checked
for size along a range.
20pt. <= size...........Header 1
18pt.
<= size < 20pt...Header 2
14pt. <= size < 18pt...Header 3
12pt.
<= size < 14pt...Header 4
10pt. <= size
< 12pt...Header 5
9pt. <= size < 10pt...Header 6
Because
our default settings also map normal bold text to 12pt. text, we don't
translate
anything to Header 4 on export.
- Hard returns in the
document are forced in the HTML browser by <BR>.
- Tabs do not
have a matching HTML tag, so we
simulate them by pretending they are list
items. Therefore, tabs can only
be used from the left margin, not in the middle of a line,
i.e., no
text tables can be made.
- Special characters: In HTML, '<', '>',
'&', and '"' are special characters and must be
escaped. The translator
simply echoes the corresponding escape code.
- Unsupported characters
(page numbers, date characters, etc.) are changed to spaces, or
simply
ignored.
How
to make HyperText links
Footnotes are seen by the translator
as a signal for a HyperText link. If you are translating a document that was
created using the ClarisWorks stationery (see below), then follow these steps:
-
Highlight the text that you want to be seen as the link anchor,
that is, the text that you
would want to click on in the browser
and go to the next location.
- Click on the macro in the Shortcuts palette.
This will automatically
change the style and
color of the anchor text to make it look like would
in Mosaic. A footnote mark will be
inserted, and you will see footnote
text instructing you to fill in the Uniform Resource
Locator of the document
you are linking to.
- Replace the text "INSERT URL HERE" with the URL of the destination document. A
URL is the method by which
file locations are represented over the World Wide Web. It
has the general
form: scheme: //host.domain
[:port] /path /filename
(For more information on HTML and
URLs, see NCSA's
HTML Primer).
If you are not using the macro, footnotes will
still trigger the translator to try and make a link. As long as you make the
anchor text look different style-wise, and create a footnote to store the URL,
it should work. If, however, you don't make the anchor a different style, the
translator will try (and probably
succeed) to make a HyperText link using the entire last text stream (up to
255 characters) as the link anchor.
About in line images
You
can have images pasted in to your text document - the translator
saves the pictures to individual files, and references them inside the HTML file.
If you are going to have the HTML document located somewhere else, these image
files must be moved with the HTML document itself, for they are noted
as being in the same relative
directory as the HTML file. In version 1.0 of the translator, the images are
saved as PICTs. This works fine if you are viewing the HTML file from your local
machine in the WWW browser, but PICTs are not the standard used on the Web.
In order for other people to be able to access the images in the document, you
will have to convert them to either GIF or XBM format. In doing this, you might
have to change the HTML file to reflect a change in picture filename. Subsequent
versions of the translator
will save them in a different format, probably GIF.
A note on images
in a document. Presently, we cannot get any information on images that have been
created inside a word processor (like ClarisWorks) and are left in the draw
layer. To make sure your image will be saved, just cut the picture out, and paste
it back in as a piece of text.
Using the ClarisWorks stationery
Although
the translator will handle almost any document
you can edit in your application,
it is easiest to compose HTML documents using the ClarisWorks "HTML
Document" stationery that should come with the translator. It contains HTML
defined styles that appear in the Style menu and has the "Create
HyperText Link" macro discussed above. The macro is document-specific,
but can be used in other documents by adding the macro to the ClarisWorks
application macro palette.
To do this, open a new document in ClarisWorks,
using the stationery menu
to select "HTML Document(WP)". When you click on OK, you will get
a blank page, but with the default HTML styles already defined. You can add the
link macro by selecting Edit Shortcuts... from the File->Shortcuts
menu. Select "Application" under "Installed
Shortcuts" and highlight the link macro in the "Available Shortcuts" window (probably at the bottom of the list). Then, simply click on
">>ADD>>" and hit OK. The HyperText Link macro button should now show up in the shortcuts
palette for every document.
YOUR
COMMENTS ARE WELCOME!!!!
We are still adapting the
code, trying to find formatting conflicts and see if there are ways to fix them.
Please note any incorrect/inaccurate HTML mappings and tell
us about them! This translator is Shareware, and may be distributed freely.
______________________________________
Brian
A. Sullivan
binky@eecs.umich.edu
Jonathan
Ryan Day
jrday@eecs.umich.edu
ADME.htmlXTNREADME.htmlPartSIT!PartSIT!´4¢R>Brian A. Sullivan and Jonathan
Ryan Day
Copyright 1994 © The University of Michigan
All rights
reserved.
ˇˇ